<template>
  <div>
    <complex-table :data="conditions">
      <el-table-column
        :label="$t('business.pod.type')"
        prop="type"
        min-width="50"
        show-overflow-tooltip
      />
      <el-table-column
        :label="$t('commons.table.status')"
        prop="status"
        min-width="30"
      />
      <el-table-column
        :label="$t('business.event.reason')"
        prop="reason"
        min-width="30"
        show-overflow-tooltip
      />
      <el-table-column
        :label="$t('commons.table.message')"
        min-width="100"
        show-overflow-tooltip
      >
        <template #default="{ row }">
          <span v-if="row.message">{{ row.message }}</span>
        </template>
      </el-table-column>
      <el-table-column
        :label="$t('business.pod.lastUpdateTime')"
        min-width="50"
        prop="lastUpdateTime"
      >
        <template #default="{ row }">
          {{ row.lastUpdateTime }}
        </template>
      </el-table-column>
    </complex-table>
  </div>
</template>

<script setup lang="ts">
import ComplexTable from "@/views/domain/kubeHud/views/components/complex-table/index.vue";
import { Condition } from "@/views/domain/kubeHud/api/k8s";
type Prop = {
  conditions: Condition[];
};

const props = defineProps<Prop>();
</script>
